import java.io.FileNotFoundException;

public class Config {
    public static void openConfig(String filename) throws FileNotFoundException {
        if(filename.equals("config.ini")){
            throw new FileNotFoundException("配置文件名不对");
        }
    }

    public static void main(String[] args) {
        try {
            openConfig("xxx");
        }catch (FileNotFoundException e){
            System.out.println("异常处理");
        }
    }
}
